<div class="ItemsWarp items-text clearfix border-top">
  <table width="100%" border="0" cellspacing="0"  cellpadding="0" class="gridlist " style="border:none">
  <col class="span-7"></col>
    <col class="span-3"></col>
    <col class="span-4" ></col>
    <col class="span-3" > </col>
    <col class="span-2 "></col>

    <{if count($products) > 0}>
    <thead>
    <th class="first"><{t}>商品名称<{/t}></th>
      <th><{t}>商品价格<{/t}></th>
      <th><{t}>查看大图<{/t}></th>
      <th><{t}>商品对比<{/t}></th>
      <th><{t}>操作<{/t}></th>
      </thead>
    <tbody>
    <{foreach from=$products item=product}>
    <tr product="<{$product.goods_id}>" valign="top" class="<{$mask_webslice}>" id="pdt-<{$product.goods_id}>">
      <td style="text-align:left"><a target="_blank" href="<{link app=b2c ctl=site_product act=index arg=$product.goods_id}>" title="<{$product.name|escape:html}>" class="entry-title"><{$product.name|escape:"html"}><span style="display:none"><img src="<{$product.thumbnail_pic|default:$env.conf.site.default_thumbnail_pic|storager}>"></span></a>
	  	<{if $product.tags}>
	        <{foreach from=$product.tags item=tags}>
	        <{if $tags.params.tag_showOnIndex}>
	        &nbsp;<span style="color:<{$tags.tag_bgcolor}>"><{$tags.tag_name}></span>
	        <{/if}>
	        <{/foreach}>
	    <{/if}>
      </td>

      <td class="font-red textcenter"><{$product.price|cur_odr}>
      <{if $product.timebuyprice}>
      <br>
      抢购价:<{$product.timebuyprice|cur_odr}>
      <{/if}>

      </td>
      <td><a  href="<{link app=b2c ctl=site_product act=viewpic arg0=$product.goods_id arg1=$product.image_default_id}>" target="_blank" title="<{t}>查看图片<{/t}>" class="member-btn-bj"><i class="has-icon"> <img src='<{$env.app.res_url}>/bundle/zoo_pic1.gif' /></i><span><{t}>查看大图<{/t}></span></a></td>
      <td><a href="javascript:void(0);" rel="_gcomp_" data-gcomp="{gid:'<{$product.goods_id}>',gname:'<{$product.name|addslashes|escape:html}>',gtype:'<{$product.type_id}>',url:'<{link app=b2c ctl=site_product act=index arg=$product.goods_id}>'}" class="btncmp member-btn-bj" title="<{t}>商品对比<{/t}>"> <i class="has-icon"> <img src='<{$env.app.res_url}>/bundle/contrast_icon.gif' /></i><span><{t}>商品对比<{/t}></span> </a></td>
      <td>
	  <ul class="cart-coll-ul">
	    <li class="star-off member-btn-bj" <{if $login!="nologin"}>star="<{$product.goods_id}>"<{/if}> class="star-off" title="<{$product.obj_items.products.0.name|escape:"html"}>"> <a <{if $login=="nologin"}> href="<{link app=b2c ctl="site_passport" act="login"}>" <{else}>href="###" rel="_fav_"<{/if}> class="btn-fav collect-cart">
	      <span><div class="fav"><{t}>收 藏<{/t}></div> <div class="nofav"><{t}>已收藏<{/t}></div></span> </a>
        </li></ul></td>
    </tr>
    <{/foreach}>
    </tbody>

    <{/if}>
  </table>
</div>


<script>
    /*
    *商品标签定位
    */
 window.addEvent('domready',function(){
          var tips = $$('.GoodsTip');



            //var opacity = tips.getElement('img').get('op')[0];

        //tips.getElement('img').setStyle('opacity',opacity);

        if(tips.length>0){

    var parSize = {
        x : tips.getParent()[0].getSize().x,
        y : tips.getParent()[0].getSize().y
    };


    var GoodsTipPos= {
        tl:{left:0,top:0},
        tc:{left:(parSize.x)/2 - 25,top:0},
        tr:{top:0,right:0},
        ml:{left:0,top:(parSize.y)/2 - 25},
        mc:{left:(parSize.x)/2 - 25,top:(parSize.y)/2 -25},
        mr:{top:(parSize.y)/2 - 25,right:0},
        bl:{bottom:0,left:0},
        bc:{bottom:0,left:(parSize.x)/2 - 25},
        br:{bottom:0,right:0}
    };


    /*.setStyles({
        'top':Pos.top,
        'left':Pos.left,
        'right':Pos.right,
        'bottom':Pos.bottom
    });
    */
    tips.each(function(v){
        v.getParent().setStyle('position','absolute');
        v.getElement('img').zoomImg(50,50);

        var ImgSrc = v.getElement('img').get('src');
        var ImgStr = "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ImgSrc+"')";

        if(Browser.ie6)
        v.getElement('img').setStyle('filter',ImgStr);

        var proPos = v.getElement('img').get('pos');

        var Pos = GoodsTipPos[proPos];
  //      if(Browser.ie6) {
   //     if(Pos.left === 0 && Pos.top===0)
   //         Pos.left -= v.getParent().getSize().x/2;
    //    };

        v.setStyles({
        'top':Pos.top,
        'left':Pos.left,
        'right':Pos.right,
        'bottom':Pos.bottom
    });
    //if(Browser.ie6) {
   //      if(Pos.left === 0 && Pos.top===0)
    //    Pos.left += v.getParent().getSize().x/2
    //};
    });
    }
    });


</script>
